﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


   public class LoginClass
    {
       public bool CheckLogin(string UserName, string Password)
       {
           bool result = false;
           try {
               InterfaceClassUserProgram i = new InterfaceClassUserProgram();
               i.UserName = UserName;
               i.Password = Password;
               result = new BusinessClass().B_CeckLoginProgram(i);
               if (result)
                   return result;
               string pUsername = plvs.Login.Settingslogin.Default.user;
               string pPassword = plvs.Login.Settingslogin.Default.pass;
               if (pUsername == UserName && pUsername == Password)
               {
                   result = true;
                   return result;
               }   
           }
           catch (Exception ex) { throw new Exception("Error 500 " + ex.Message); }
           return result;
       }
    }
